# isclose判断a、b数组每一位是否都相同，返回多个True or Faslse
# isclose(a, b, rtol=1e-05, atol=1e-08, equal-nan=False)

# allclose、b数组每一位是否都相同，一个不同就为False，全部相同才为True，返回一个True or Faslse
# allclose(a, b, rtol=1e-05, atol=1e-08, equal-nan=False)

import numpy as np
x = np.array([1, 2, 3, 4.001, 5])
y = np.array([1, 1.999, 3, 4.01, 5.1])

print(np.allclose(x, y))
print(np.allclose(x, y, rtol=0.2))
print(np.allclose(x, y, atol=0.2))
print(np.isclose(x, y))
print(np.isclose(x, y, atol=0.2))